import request from '../../request'

// 获取科室类型（核算分类）
export function getPropertyByEdName(params) {
  return request({
    url: 'bdEnumdetail/getPropertyByEdName',
    method: 'GET',
    params
  })
}

// 获取规则详情
export function getDepartmentByType(params) {
  return request({
    url: 'bdDepartment/getDepartmentByType',
    method: 'GET',
    params
  })
}

// 获取科室字典类型（科室属性）
export function getTypeByEdName(params) {
  return request({
    url: 'bdEnumdetail/getTypeByEdName',
    method: 'GET',
    params
  })
}

// 获取临床属性
export function getClinicalPropertyId(params) {
  return request({
    url: 'bdEnumdetail/getClinicalPropertyId',
    method: 'GET',
    params
  })
}

// 获取科室列表
export function getParentCodeList(params) {
  return request({
    url: 'bdDepartment/getParentCodeList',
    method: 'POST',
    data: params
  })
}

// 科室模糊查询
export function getParentCode(params) {
  return request({
    url: 'bdDepartment/getParentCode',
    method: 'GET',
    params
  })
}

// 修改科室字典
export function updateDepartment(params) {
  return request({
    url: 'bdDepartment/updateDepartment',
    method: 'POST',
    data: params
  })
}

//  获取科室列表 
export function getEnumDetailSource(params) {
  return request({
    url: 'bdEnumdetail/getEnumDetailSource',
    method: 'POST',
    data: params
  })
}

export function getDepartmentSource(params) {
  return request({
    url: 'bdDepartment/getDepartmentSource',
    method: 'POST',
    data: params
  })
}

// nbsp 获取数据
export function getDepartmentSourceWithOrganization(params) {
  return request({
    url: 'bdDepartment/getDepartmentSourceWithOrganization',
    method: 'POST',
    data: params
  })
}


// 修改科室部门
export function modifyDepartment(params) {
  return request({
    url: 'bdDepartment/modifyDepartment',
    method: 'POST',
    data: params
  })
}

// bdDepartment/getDepartmentOrganization 获取成本科室组织架构
export function getDepartmentOrganization(params) {
  return request({
    url: 'bdDepartment/getDepartmentOrganization',
    method: 'POST',
    data: params
  })
}

// 添加科室部门
export function addDepartment(params) {
  return request({
    url: 'bdDepartment/addDepartment',
    method: 'POST',
    data: params
  })
}
// 科室字典-获取科室下拉
export function getDeptSelect(params) {
  return request({
    url: 'bdDepartment/getDepartmentSource',
    method: 'POST',
    data: params
  })
}

//科室字典-规则删除
export function updateRowStatusById(params) {
  return request({
      url: 'bdDepartment/updateRowStatusById',
      method: 'get',
      params
  })
}

//科室字典-列表删除
export function deleteByIdKszd(params) {
  return request({
      url: 'bdDepartment/deleteById',
      method: 'get',
      params
  })
}


